home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.9 KB | 121 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWBWPat.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWBWPAT_H
- #define FWBWPAT_H
-
- #ifndef FWPAT_H
- #include "FWPat.h"
- #endif
-
- // ----- Foundation Includes -----
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWPRIMEM_H
- #include "FWPriMem.h"
- #endif
-
- // ----- Macintosh Includes -----
-
- #if defined(FW_BUILD_MAC) && !defined(__QUICKDRAW__)
- #include <QuickDraw.h>
- #endif
-
- // ----- Windows Includes -----
-
- #if defined(FW_BUILD_WIN) && !defined(_INC_WINDOWS)
- #include <windows.h>
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Class Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CReadableStream;
-
- //========================================================================================
- // CLASS FW_CBWPatternRep
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CBWPatternRep : public FW_CPatternRep
- {
- friend class FW_CLASS_ATTR FW_PPattern;
-
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- protected:
- FW_CBWPatternRep();
- FW_CBWPatternRep(const FW_BitPattern& bits);
- FW_CBWPatternRep(FW_CReadableStream& stream);
-
- virtual ~FW_CBWPatternRep();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean IsEqual(const FW_CGraphicCountedPtrRep* other) const;
- virtual void Flatten(FW_CWritableStream& archive) const;
-
- virtual FW_PPattern Copy() const;
-
- virtual FW_Boolean IsBlack() const;
-
- virtual void Invert();
-
- virtual void FlipHorizontaly();
- virtual void FlipVerticaly();
-
- virtual void ShiftUp();
- virtual void ShiftDown();
- virtual void ShiftLeft();
- virtual void ShiftRight();
-
- static void* Read(FW_CReadableStream& archive);
-
- private:
- void MoveBitPattern(const void* source, void* destination)
- {FW_PrimitiveCopyMemory(source, destination, 8);}
-
- //----------------------------------------------------------------------------------------
- // Platform Specific
- //
- public:
- #ifdef FW_BUILD_WIN
- virtual HBRUSH WinCreatePatternBrush() const;
- #endif
-
- #ifdef FW_BUILD_MAC
- virtual void MacSetInCurPort() const;
- #endif
-
- //----------------------------------------------------------------------------------------
- // Data Member
- //
- private:
- FW_BitPattern fBitPattern; // ODF convention 1:foreground 0:background
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-